home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / c / qtools0.2-src.lha / src / libqtools / wad.h < prev   
Encoding:
C/C++ Source or Header  |  1998-07-18  |  1.9 KB  |  61 lines

  1. #ifndef    WAD_H
  2. #define    WAD_H
  3. /*
  4.  * ============================================================================
  5.  * structures
  6.  * ============================================================================
  7.  */
  8.  
  9. #define MAGIC_WAD2    MKID('W','A','D','2')    /* 0x57414432 */
  10.  
  11. struct wadheader {
  12.   magick magic;
  13.   /*
  14.    * WAD2 
  15.    */
  16.   int numentries, offset;
  17. };
  18.  
  19. #define NAMELEN_WAD 16
  20. struct wadentry {
  21.   int offset, wadsize, memsize;
  22.   unsigned char type, compr;
  23.   short int dummy;
  24.   char name[16];
  25. };
  26.  
  27. #define    CMP_NONE        0
  28. /* bitdefs */
  29. #define    CMP_LZSS        (1<<0)
  30. #define    CMP_LZ77        (1<<1)                /* compressed with a LZ77 */
  31. #define    CMP_BTPC        (1<<2)                /* compressed with a subtype of BTPC (lossless/lossy, 0-100) */
  32. #define CMP_MIP0        (1<<3)                /* store only mip0 instead of all */
  33. #define CMP_ALL            ((1<<4)-1)
  34.  
  35. #define WAD2_PALETTE    '@'
  36. #define WAD2_MIPMAP    'D'
  37. #define WAD2_STATUSBAR    'B'
  38. #define WAD2_CONPIC    'E'
  39.  
  40. /*
  41.  * ============================================================================
  42.  * globals
  43.  * ============================================================================
  44.  */
  45.  
  46. /*
  47.  * ============================================================================
  48.  * prototypes
  49.  * ============================================================================
  50.  */
  51.  
  52. struct palpic *GetWAD2Picture(HANDLE wadFile, struct wadentry *Entry);
  53. struct rawdata *GetWAD2Raw(HANDLE wadFile, struct wadentry *Entry);
  54. bool AddWAD2(struct palpic *inPic, struct rawdata *inData, char *wadName, operation procOper, filetype wadType);
  55. bool ExtractWAD2(HANDLE file, FILE * script, char *destDir, char *entryName, unsigned char convert, operation procOper, filetype wadType);
  56. bool CheckWAD2(HANDLE wadFile, struct wadheader *Header, bool newWad);
  57. struct wadentry *FindWAD2(HANDLE wadFile, char *entryName, struct wadheader *Header, struct wadentry **Entry, filetype wadType);
  58. struct wadentry *SearchWAD2(char *entryName, struct wadheader *Header, struct wadentry *allEntries, filetype wadType);
  59.  
  60. #endif
  61.